package com.study.jyg.rxjava2study.activity;

import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.View;
import android.widget.LinearLayout;

import com.study.jyg.rxjava2study.R;
import com.study.jyg.rxjava2study.widget.DropdownLayout;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 下拉抽屉
 */
public class DropdownViewActivity extends AppCompatActivity {

    @BindView(R.id.toolBar)
    Toolbar toolBar;
    @BindView(R.id.top_bar)
    LinearLayout topBar;
    @BindView(R.id.dropdown_layout)
    DropdownLayout mDropdownView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dropdown_view);
        ButterKnife.bind(this);
        setSupportActionBar(toolBar);
        toolBar.setNavigationOnClickListener(v -> finish());
    }

    public void onClick(View v){
        mDropdownView.toggle();
    }
}
